//
//  CZModel.m
//  itheima_寻宝之旅_4.5(OC)
//
//  Created by 肖祺 on 16/4/5.
//  Copyright © 2016年 肖祺. All rights reserved.
//

#import "CZModel.h"

@implementation CZModel

-(instancetype)initWithDic:(NSDictionary *)dic{
    
    if (self = [super init]) {
        
        [self setValuesForKeysWithDictionary:dic];
    }
    
    return self;
}

+(instancetype)HeadWithDic:(NSDictionary *)dic{
    
    
    return [[self alloc]initWithDic:dic];
}

+(NSArray *)Model:(NSArray *)array{

    NSMutableArray *arrayM = [NSMutableArray array];
    
    for ( NSDictionary *fg in array) {
        
        CZModel *model = [CZModel HeadWithDic:fg];
        
        
        [arrayM addObject:model];
        
        
    }
    
    
    return arrayM;
    
}

@end
